package com.stylefeng.guns.modular.cash.service;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.stylefeng.guns.core.exception.GunsException;
import com.stylefeng.guns.modular.system.model.CashExpenditure;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author stylefeng123
 * @since 2018-07-03
 */
public interface ICashExpenditureService extends IService<CashExpenditure> {




    /**
     * 插入收支
     * @return
     */
    boolean insertCash(CashExpenditure cashExpenditure);


    /**
     * 描述:组装piso现金收支报表页面数据
     * 创建人: laoyu
     * 日期: 2018/7/30 0030
     * 时间: 下午 4:41
     */
    public Page<CashExpenditure> serach(Page<CashExpenditure> page,EntityWrapper<CashExpenditure> wrapper)throws GunsException;

    /**
     * 描述:修改现金收支表
     * 创建人: laoyu
     * 日期: 2018/7/30 0030
     * 时间: 下午 9:51
     */
    public void update(CashExpenditure oldCashExpenditure,CashExpenditure cashExpenditure)throws GunsException;

    public void updateBalance(int id,CashExpenditure cashExpenditure)throws GunsException;

    /**
     * 描述:组装下载数据
     * 创建人: laoyu
     * 日期: 2018/8/2 0002
     * 时间: 下午 5:42
     */
    public Map<String, Object> load(List<CashExpenditure> cashExpenditureList,String platform,String beginDate,String endDate) throws GunsException;
    
    /**
     * 描述:统计PS收入/支出明细分类表
     * 创建人: laoyu
     * 日期: 2018/8/8 0008
     * 时间: 下午 4:40
     */
    public Map<String,Object> total(EntityWrapper<CashExpenditure> wrapper)throws GunsException;

}
